// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLName;
// import com.alibaba.druid.sql.ast.SQLObject;
// import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
// import com.alibaba.druid.sql.ast.statement.SQLLockTableStatement;
// import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;

// import java.util.ArrayList;
// import java.util.List;
#pragma once
#include "OracleStatementImpl.h"
#include "../../../../ast/statement/SQLLockTableStatement.h"

class OracleLockTableStatement_LockMode
{
public:
  static OracleLockTableStatement_LockMode_ptr ROW_SHARE;
  static OracleLockTableStatement_LockMode_ptr ROW_EXCLUSIVE;
  static OracleLockTableStatement_LockMode_ptr SHARE_UPDATE;
  static OracleLockTableStatement_LockMode_ptr SHARE;
  static OracleLockTableStatement_LockMode_ptr SHARE_ROW_EXCLUSIVE;
  static OracleLockTableStatement_LockMode_ptr EXCLUSIVE;

  string_ptr name;
  uint64_t mask;
  OracleLockTableStatement_LockMode(uint64_t mask, string_ptr name);
  string_ptr toString();
};

class OracleLockTableStatement
    : virtual public OracleStatementImpl,
      virtual public SQLLockTableStatement
{
public:
  SQLExprTableSource_ptr table;
  OracleLockTableStatement_LockMode_ptr lockMode;
  BOOL_ptr noWait;
  SQLExpr_ptr wait;
  SQLExpr_ptr partition;

  SHAREDOBJECT(OracleLockTableStatement);
  BOOL_ptr isNoWait();

  void setNoWait(BOOL_ptr noWait);

  SQLExpr_ptr getWait();

  void setWait(SQLExpr_ptr wait);

  SQLExprTableSource_ptr getTable();

  void setTable(SQLExprTableSource_ptr table);

  void setTable(SQLName_ptr table);

  OracleLockTableStatement_LockMode_ptr getLockMode();

  void setLockMode(OracleLockTableStatement_LockMode_ptr lockMode);

  SQLExpr_ptr getPartition();

  void setPartition(SQLExpr_ptr partition);

  // @Override
  void accept0(OracleASTVisitor_ptr visitor);

  SQLObject_list_ptr getChildren();
};
